<?php
namespace app\admin\model;
use think\Model;
use think\Db;
class Location extends Model
{
    private $fields = array('location');
    protected $table = 'tp_location';

    function mainAllList(){
        $where[] = ['status','=',1];
        $list = $this->where($where)->order('id desc')->select();

        return $list;
    }

    //处理参数
    function disposeData($data,$act=''){

        $newData = array_elements($this->fields, $data);

        return $newData;
    }
}